package com.bkhc.business.entity;

import com.bkhc.common.enu.IndentityEnum;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

/**
 * 顾客
 */
@Entity
@Data
@Table(name = "tbl_business_group_customer")
@EntityListeners(AuditingEntityListener.class)
public class Customer {
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Id
    private int id ;

    @Column(name = "user_id")
    private String userId;

    @Column(name = "username")
    private String username;

    @Column(name = "mobile")
    private String mobile;

    @Column(name = "identity")
    private String identity;

    @Column(name = "invite_code")
    private String inviteCode;

    @Column(name = "business_group_member")
    private String businessGroupMember;

    @Column(name = "group_code")
    private String groupCode;

    @Column(name = "creator",updatable = false)
    private String creator;

    @Column(name = "create_date",updatable = false)
    @CreatedDate
    private Date createDate;

    @Column(name = "updator")
    private String updator;

    @LastModifiedDate
    @Column(name = "update_date")
    private Date updateDate;

    @Transient
    private String information;

    @Transient
    private String identityName;

}
